/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ASAExpr;

import javax.swing.JOptionPane;

/**
 *
 * @author FM & KB
 */
public class ASAExprRead extends ASAExpr {

    @Override
    public String notationExplorateur(String prefixe) {
        String res = prefixe + getLabelExplorateur() + "\n";
        return res;
    }

    @Override
    public String getLabelExplorateur() {
        return "READ";
    }

    @Override
    public int evalue() {
        try {
            int val = Integer.parseInt(JOptionPane.showInputDialog("Entrez un entier"));
            return val ;
        } catch (NumberFormatException ex) {
            System.out.println(ex.getMessage());
            return -1;
        }
    }
    
}
